package com.example.iccil.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName user_third_party
 */
@TableName(value ="user_third_party")
@Data
public class UserThirdParty implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long userid;

    /**
     * 
     */
    private String logintype;

    /**
     * 
     */
    private String uuid;

    /**
     * 
     */
    private String accesscode;

    /**
     * 
     */
    private Date expiresat;

    /**
     * 
     */
    private Integer isbind;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserThirdParty other = (UserThirdParty) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getLogintype() == null ? other.getLogintype() == null : this.getLogintype().equals(other.getLogintype()))
            && (this.getUuid() == null ? other.getUuid() == null : this.getUuid().equals(other.getUuid()))
            && (this.getAccesscode() == null ? other.getAccesscode() == null : this.getAccesscode().equals(other.getAccesscode()))
            && (this.getExpiresat() == null ? other.getExpiresat() == null : this.getExpiresat().equals(other.getExpiresat()))
            && (this.getIsbind() == null ? other.getIsbind() == null : this.getIsbind().equals(other.getIsbind()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getLogintype() == null) ? 0 : getLogintype().hashCode());
        result = prime * result + ((getUuid() == null) ? 0 : getUuid().hashCode());
        result = prime * result + ((getAccesscode() == null) ? 0 : getAccesscode().hashCode());
        result = prime * result + ((getExpiresat() == null) ? 0 : getExpiresat().hashCode());
        result = prime * result + ((getIsbind() == null) ? 0 : getIsbind().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userid=").append(userid);
        sb.append(", logintype=").append(logintype);
        sb.append(", uuid=").append(uuid);
        sb.append(", accesscode=").append(accesscode);
        sb.append(", expiresat=").append(expiresat);
        sb.append(", isbind=").append(isbind);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}